#ifndef HARDCODED_MODE_H
#define HARDCODED_MODE_H

#include <spriteViewerMode.h>

#include <foun/matrix.h>

namespace lct
{
namespace spri
{
	struct FigureAsset;
	struct SkinAsset;
	struct AnimationAsset;
	class BindingBuilder;
	struct FigureSkinBinding;
	struct AnimationFigureBinding;
	class InstanceBuilder;
	class FigureInstance;
	class AnimationInstance;
	class DrawContext;
}
namespace imag
{
	class AssetProcessor;
}
}

class HardcodedMode : public SpriteViewerMode
{
public:
	HardcodedMode();
	virtual ~HardcodedMode();

	virtual void Init();

	virtual void AcquireGraphics();
	virtual void ReleaseGraphics();

	virtual void Update();
	virtual void Draw();

private:
	void BuildFigureAssets();
	void BuildSkinAssets();
	void BuildAnimationAssets();
	void BuildBindings();
	void BuildInstances();

	void FixupAnimationAsset(lct::spri::AnimationAsset& animationAsset);

	lct::spri::FigureAsset* m_pFigureAsset;
	lct::spri::SkinAsset* m_pSkinAsset;
	lct::spri::AnimationAsset* m_pAnimationAsset;
	lct::spri::BindingBuilder* m_pBindingBuilder;
	lct::spri::FigureSkinBinding* m_pFigureSkinBinding;
	lct::spri::AnimationFigureBinding* m_pAnimationFigureBinding;
	lct::spri::InstanceBuilder* m_pInstanceBuilder;
	lct::spri::FigureInstance* m_pFigureInstance;
	lct::spri::AnimationInstance* m_pAnimationInstance;

	lct::imag::AssetProcessor* m_pImageAssetProcessor;

	lct::foun::Matrix44 m_projectionTransform;
};

#endif//HARDCODED_MODE_H
